//
//  MYNewsDetailsModel.m
//  MuYing
//
//  Created by tbb on 2020/2/29.
//  Copyright © 2020 TBB. All rights reserved.
//

#import "MYNewsDetailsModel.h"

@implementation MYNewsDetailsModel
+ (nullable NSDictionary<NSString *, id> *)modelContainerPropertyGenericClass {
    return @{@"informationImgList":[MYNewsDetailsImageModel class],
             @"moreList":[MYNewsDetailsMoreModel class],
             @"informationCommentList":[MYNewsDetailsCommentModel class]
    };
}
@end


@implementation MYNewsDetailsImageModel



@end

@implementation MYNewsDetailsMoreModel
-(NSString *)distanceStr {
    if (!_distanceStr) {
        CGFloat distance = [self.distance doubleValue];
        if (distance > 1000.0) {
            _distanceStr = [NSString stringWithFormat:@"%@%.1lfkm",kYQLS(@"距离您当前位置"),distance/1000.0];
        }else{
            _distanceStr = [NSString stringWithFormat:@"%@%.0lfm",kYQLS(@"距离您当前位置"),distance];
        }

    }
    return _distanceStr;
}

-(NSString *)createTimeStr {
    if (!_createTimeStr) {
        _createTimeStr = [NSDate timeToDateStr:[self.createTime doubleValue]];
    }
    return _createTimeStr;
}

@end

@implementation MYNewsDetailsCommentModel



@end
